<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">

<head>
	<title>Microsoft - My Web Pages Starter Kit - Installation Guide</title>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<style type="text/css">
	
	BODY {background-color: #E7F1FA; margin:0; }
	
	A, A:visited, A:active, A:hover, A:link {
		color: #000000;
		text-decoration: underline;
	}
	
	TD {
		vertical-align: top;
	}
	
	.tit {
		font-family: Verdana,Arial,sans-serif;
		font-size: 20px;
		color: #003399;
	}
	
	.titsub {
		font-family: Verdana,Arial,sans-serif;
		font-size: 11px;
		font-weight: bold;
		color: #003399;
		
		line-height: 17px;
	}
	
	.txt {
		font-family: Verdana,Arial,sans-serif;
		font-size: 11px;
		color: #000000;
		
		line-height: 17px;
	}
	
	.desctit {
		font-family: Verdana,Arial,sans-serif;
		font-size: 14px;
		font-weight: bold;
		color: #003399;
	}
	
	.desctitsub {
		font-family: Verdana,Arial,sans-serif;
		font-size: 11px;
		font-weight: bold;
		color: #003399;
		line-height: 17px;
	}
	
	.desctxt {
		font-family: Verdana,Arial,sans-serif;
		font-size: 11px;
		color: #003399;
		line-height: 17px;
	}
	
	</style>
</head>

<body>


<table width="795" border="0" cellspacing="0" cellpadding="0">
<tr>
	<td colspan="3"><img src="../_img/header_starterkit.jpg" width="795" height="184" alt="" /></td>
</tr>
<tr>
	<td width="20"><img src="../_img/spacer.gif" width="20" height="1" alt="" /></td>
	<td width="755">
	
	<table width="755" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td width="528" height="1"><img src="../_img/spacer.gif" width="528" height="1" alt="" /></td>
		<td width="20"><img src="../_img/spacer.gif" width="20" height="1" alt="" /></td>
		<td width="207"><img src="../_img/spacer.gif" width="207" height="1" alt="" /></td>
	</tr>
	<tr>
		<td class="tit">Installation, First Steps and<br /> Important Information (Version 1.0)</td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td height="25" colspan="3"></td>
	</tr>
	<tr>
		<td class="txt" style="height: 238px"><i>My Web Pages Starter Kit</i> is an ASP.NET 2.0 Content Management System. As a web application it enables users to set up and maintain web sites through a browser based administration interface.<br />
		<br />
		The <i>My Web Pages Starter Kit</i> is composed of modules and is easily extensible. Administrators can unpack it directly on the server and start building web sites. Using Visual Studio or the Visual Studio Web Developer Express Edition, developers can easily customize and extend the features of the CMS. <br />
		<br />
		This document explains how to set up <i>My Web Pages Starter Kit</i> and gives you hints on how to develop your own controls and extend the CMS. 
            <br />
            <br />
            For additional questions, news, releases and the project's news feed visit the <a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=MyWebPagesStarterKit" target=_blank><i>My Web Pages Starter Kit</i> project on Codeplex.com</a>.</td>
		<td style="height: 238px"></td>
		<td style="height: 238px"></td>
	</tr>
	<tr>
		<td height="40" colspan="3"></td>
	</tr>
	<tr>
		<td class="tit">1 Running it locally</td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td height="25" colspan="3"></td>
	</tr>
	<tr>
		<td>
		
		<table border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td class="txt">-&nbsp;</td>
			<td class="txt">Extract all files contained in the ZIP file to your hard drive</td>
		</tr>
		<tr>
			<td class="txt">-</td>
			<td class="txt">Launch Visual Studio 2005 or Visual Studio Web Developer Express</td>
		</tr>
		<tr>
			<td class="txt">-</td>
			<td class="txt">Select "File->Open Web Site" to open the Web Site</td>
		</tr>
		<tr>
			<td class="txt">-</td>
			<td class="txt">Hit F5 to launch the Web Site in your browser</td>
		</tr>
		<tr>
			<td class="txt"></td>
			<td class="txt">(You do not really need to run the web application locally if you don't want to modify the kit. You may just unpack the files and  publish them to your web host. See section 2)</td>
		</tr>
		</table>
		
		</td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td height="40" colspan="3"></td>
	</tr>
	<tr>
		<td class="tit">2 Publishing to your web host</td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td height="25" colspan="3"></td>
	</tr>
	<tr>
		<td>
		
		<table border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td class="txt">-</td>
			<td class="txt">The <i>My Web Pages Starter Kit</i> requires an ASP.NET 2.0 hoster <a href="http://msdn.microsoft.com/asp.net/info/hosters/" target=_blank>(Selection)</a></td>
		</tr>
		<tr>
			<td class="txt">-&nbsp;</td>
			<td class="txt">Upload the files<br />

			<ul>
				<li>Open a hosting account with a hoster who supports the Microsoft ASP.NET 2.0 web technology <a href="http://msdn.microsoft.com/asp.net/info/hosters/" target=_blank>(Selection)</a>. In return the hoster will provide you the access data, which you need to maintain your website in your role as a webmaster.</li>
				<li>Publish <i>My Web Pages Starter Kit</i> to your hoster by uploading all files (except the App_Data folder) to your hoster. This is usually done with an <a href="http://en.wikipedia.org/wiki/Ftp_client" target=_blank>&lsquo;FTP Client&rsquo;</a>. In order to do so you need the server name and your credentials for your account (username &amp; password) from your hoster.<br />
                    <em>Note:</em> The App_Data folder is a special ASP.NET 2.0 folder and requires
                    special permissions (Windows 2000: write privileges for the "ASPNET" account / Windows
                    2003: write privileges for the "Network Service" account and the additional right
                    to read the attributes of the superior directories). If your hoster has already created this folder, do not overwrite it as you will lose these special permissions. If it does not exist, create it and ask your hoster to grant write access to the ASPNET user. Without these access permissions the MWPSK code is unable to store your information there. </li>
				<li><i>My Web Pages Starter Kit</i> requires at least medium trust (<a href="http://msdn.microsoft.com/library/en-us/dnpag2/html/paght000020.asp?frame=true&_r=1" target=_blank>Learn more</a>). Usually the hoster has already set the medium trust level in the machine.config file. Therefore this specification in the web.config file is commented out. We recommend you to uncomment this setting in the web.config file if you work with the <i>My Web Pages Starter Kit</i> locally to make sure that your additional code is compliant with the medium trust restrictions.</li>
			</ul>
			</td>
		</tr>
		<tr>
			<td class="txt">-</td>
			<td class="txt">Launch your web browser and type in the URL of your <i>My Web Pages Starter Kit</i> website. After a short delay, <i>My Web Pages Starter Kit</i> creates the initial data files in your App_Code folder and it will show you a default homepage.</td>
		</tr>
		<tr>
			<td class="txt">-</td>
			<td class="txt">Change your administrator password by clicking on "Administration->User Management"<br>(Initial username is admin; initial password is: admin)<br>Log in as administrator (admin/yournewpassword)</td>
		</tr>
		<tr>
			<td class="txt">-</td>
			<td class="txt">Configure your web site by clicking on "Administration->CMS Setup"<br />
			
			<ul>
				<li>NOTE: As long as you did not specify a Smtp-Server or Mail Sender Address, all features and controls that send emails (like Password Reset, Contact Form, etc.) will not be available.</li>
			</ul>
			</td>
		</tr>
		</table>
		
		</td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td height="40" colspan="3"></td>
	</tr>
	<tr>
		<td class="tit">3 Architecture</td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td height="25" colspan="3"></td>
	</tr>
	<tr>
		<td class="titsub">3.1	UI Layer</td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td height="20" colspan="3"></td>
	</tr>
	<tr>
		<td class="txt">ASPX Files are responsible for the rendering of the pages. User accessible pages are in the root directory, administration pages in the "administration" folder. Default.aspx handles the rendering of all customizable pages (i.e. those that can contain your own content and controls). Additionally, specific ASPX pages exist for website searches, Login and changing your password.<br />
		<br />	
		A <i>My Web Pages Starter Kit</i> page can contain so-called sections, which are UserControls (<a href="http://msdn2.microsoft.com/en-us/library/y6wb1a0e.aspx" target=_blank>learn more</a>) derived from SectionControlBaseClass. For a control to be able to be used in <i>My Web Pages Starter Kit</i>, it must meet the following criteria:
			<ul>
				<li>Inherit your control from <code><i>My Web Pages Starter Kit</i>.Controls.SectionControlBaseClass</code></li>
				<li>Together with your section control, you should always create a class that contains the business logic and the data for the particular section (also see below, Data Access Layer).</li>
			</ul>
		</td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td height="25" colspan="3"></td>
	</tr>
	<tr>
		<td class="titsub">3.2 Business Logic</td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td height="20" colspan="3"></td>
	</tr>
	<tr>
		<td class="txt">Standard classes: Keep in mind not to use them as data objects, and don't embed layout/UI code into them.</td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td height="25" colspan="3"></td>
	</tr>
	<tr>
		<td class="titsub">3.3 Data Access Layer</td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td height="20" colspan="3"></td>
	</tr>
	<tr>
		<td class="txt">ASP.NET 2.0 in Medium Trust mode (and thus <i>My Web Pages Starter Kit</i>) is allowed to write files in App_Data. The generic class "Persistable" simplifies the data access.<br />
		<br />
		In order to make a new section (let's call it <code>MySection</code>) that persist its data, you must derive your class from <code>Section&lt;T&gt;</code>, where <code>&lt;T&gt;</code> is <code>MySection.MySectionData</code><br />
		Your class declaration should then start as follows: <br/>
		<code>class MySection : Section&lt;MySection.MySectionData&gt;</code><br />
		<br />
		The <code>MySectionData</code>-Class must be an inner class of <code>MySection</code>. All the fields you want to be persistent must be put into that inner class as public members. In your <code>MySection</code>-class you can then access all the members of the inner class by using the <code>_data</code>-member inherited from <code>Section&lt;T&gt;</code>. If you create an instance of your section and pass a unique identifier to the constructor, the data corresponding to that id is automatically loaded out of the App_Data folder and you can access it by using the <code>_data</code>-member.<br />
		<br />
		If at some point in your code, you want changed values to be persisted back into the App_Data folder, you can call the <code>SaveData()</code> method of your section (inherited from <code>Section&lt;T&gt;</code>).<br />
		<br />
		A good starting point for developing your own sections is the HtmlContent section delivered with <i>My Web Pages Starter Kit</i> as it shows you the most basic principles in very few lines of code.
		</td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td height="40" colspan="3"></td>
	</tr>
	<tr>
		<td class="tit">4 Things to remember for security reasons</td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td height="25" colspan="3"></td>
	</tr>
	<tr>
		<td class="titsub">4.1 Webmaster</td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td height="20" colspan="3"></td>
	</tr>
	<tr>
		<td class="txt">As a webmaster, you should remember the following important things:<br />
			
		<ol>
			<li>Please change the 'admin' password as a first action after deployment of your <i>My Web Pages Starter Kit</i> Website.</li>
			<li>Log in as admin and set the smpt server (you get this from your hoster) and set your email address for the admin account.</li>
			<li>Subscribe to the <i>My Web Pages Starter Kit</i> newsfeed, as it may provide critical security notifications.</li>
			<li>Evaluate safety of the shared hosting environment before selecting <i>My Web Pages Starter Kit</i> and a hosting environment and an account type<br />
						
			<ol type="a">
				<li>Don't store personal information on a website in shared hosting environment, as for example:<br />
					
				<ul>
					<li>personal data of other people</li>
					<li>health information</li>
					<li>credit card information</li>
				</ul>

				</li>
				<li>Evaluate whether a shared hosting infrastructure is safe enough for your purpose.</li>
				<li>Evaluate whether unencrypted communication is reasonable (usernames, passwords)</li>
			</ol>
			</li>
			<li>Backup your data on a regular base by downloading the content of the App_Data folder via FTP.</li>
			<li>Assign clear responsibilities for maintenance of your homepage:<br />
			
			<ol type="a">
				<li>Who receives security issue notifications? </li>
				<li>Who does regular backups?</li>
			</ol>
			</li>
		</ol>

		</td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td height="25" colspan="3"></td>
	</tr>
	<tr>
		<td class="titsub">4.2 Developer</td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td height="20" colspan="3"></td>
	</tr>
	<tr>
		<td class="txt">As a developer, you should remember the following important things:<br />
			
		<ol>
			<li>Do not modify the way passwords are hashed.</li>
			<li>Do not extend the software in a way, which encourages storage of sensitive information, which is not protected enough in shared hosting environments, as there are:<br />
			
			<ul>
				<li>personal data of other people</li>
				<li>health information</li>
				<li>credit card information</li>
			</ul>
			</li>
			<li>Consider security best practice when extending and modifying the kit.</li>
			<li>Make sure you have subscribed the <i>My Web Pages Starter Kit</i> newsfeed to receive the latest news in case of a security issue.</li>
			<li>Keep track on the people for whom you have changed/extended/deployed <i>My Web Pages Starter Kit</i> and which you may want to notify them if a security issue appears</li>
			<li>Make sure you always have a copy of your source code, as you may need to test or integrate changes based on security fixes in the future.</li>
		</ol>
		</td>
		<td></td>
		<td></td>
	</tr>
	<tr>
		<td height="25" colspan="3"></td>
	</tr>
	</table>
	
	</td>
</tr>
</table>

</body>
</html>
